package dungnt.vpoint.mathtest;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.app.Activity;
import android.content.Intent;

public class PlayActivity extends Activity implements OnClickListener{

    Button btnAdd, btnSubtract, btnMultiply, btnDivide, btnFinalTest;
    
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_play);
		
		btnAdd = (Button)findViewById(R.id.btnAdd);
		btnSubtract = (Button)findViewById(R.id.btnSubtract);
		btnMultiply = (Button)findViewById(R.id.btnMultiply);
		btnDivide = (Button)findViewById(R.id.btnDivide);
		btnFinalTest = (Button)findViewById(R.id.btnFinalTest);
		
		btnAdd.setOnClickListener(this);
		btnSubtract.setOnClickListener(this);
		btnMultiply.setOnClickListener(this);
		btnDivide.setOnClickListener(this);
		btnFinalTest.setOnClickListener(this);
	}

	
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
        case R.id.btnAdd:
            Intent add_intent = new Intent(this, AddActivity.class);
            startActivity(add_intent);
            break;
        case R.id.btnSubtract:
            Intent sub_intent = new Intent(this, SubtractActivity.class);
            startActivity(sub_intent);
            break;
        case R.id.btnMultiply:
            Intent multi_intent = new Intent(this, MultiplyActivity.class);
            startActivity(multi_intent);
            break;
        case R.id.btnDivide:
            Intent div_intent = new Intent(this, DivideActivity.class);
            startActivity(div_intent);
            break;
        case R.id.btnFinalTest:
            Intent final_intent = new Intent(this, FinalTestActivity.class);
            startActivity(final_intent);
            break;
        }
    }

}
